import 'package:flutter/material.dart';
import 'package:treasure/global.dart';
import 'package:treasure/pages/about/about_page.dart';
import 'package:treasure/pages/account/account_page.dart';
import 'package:treasure/pages/cabinet/cabinet_page.dart';
import 'package:treasure/pages/home/home_page.dart';
import 'package:treasure/pages/setting/setting_page.dart';
import 'package:treasure/pages/treasure/treasure_page.dart';

class MyRouter {
  
  static const homePage = 'app://';

  static const cabinetPage = 'app://CabinetPage';

  static const treasurePage = 'app://TreasurePage';

  static const accountPage = 'app://AccountPage';

  static const aboutPage = 'app://AboutPage';

  static const settingPage = 'app://SettingPage';

  static Map<String, Widget Function(BuildContext)> createRoutes() {
    return {
      homePage: (context) => const HomePage(title: Global.appName),
      cabinetPage: (context) => const CabinetPage(),
      treasurePage: (context) => const TreasurePage(),
      accountPage: (context) => const AccountPage(),
      aboutPage: (context) => const AboutPage(),
      settingPage: (context) => const SettingPage(),
    };
  }
}
